package cn.dmp.charts.media

import java.io

import org.apache.spark.rdd.RDD

object AppNameParseUtils {
  def parseFromAppId(value: Map[String, String], _11: String) = {

  }

  /* def parseOtherToAppName(rule, appId: String)= {
 //(name,id)
     val rulesMap: Map[String, String] = rules.toMap

     val appname= rulesMap.get(appId)

     val appName= if(appname !=null && ! "".equals(appname)) appname else "其他"

   }*/

  def parseFromAppId(rules: Array[(String, String)], appId: String): String = {
    var appName = ""

     for(r <- rules if r._2.equals(appId)){
      appName = r._1
     }

    appName
  }


}
